Repository navigation
fix(repack): respect output.devtoolModuleFilenameTemplate in SourceMapPlugin - #1532
Open
JaydeepAgravat wants to merge 1 commit into
Open
JaydeepAgravat wants to merge 1 commit into
JaydeepAgravat wants to merge 1 commit into
Conversation
|
@JaydeepAgravat is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 645ae60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
JaydeepAgravat
marked this pull request as ready for review
November 21, 2026 08:39
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Without the dev server (for example with the
bundlecommand),SourceMapPluginalways writes absolute paths from the build machine tosourcesand ignoresoutput.devtoolModuleFilenameTemplate. The line that read the option was commented out in #1172, when the plugin got its own module filename handlers for dev and production.As discussed in #1518, this keeps the current default and only uses
output.devtoolModuleFilenameTemplatewhen it's set and the dev server isn't running. Neither Rspack nor webpack sets a default for this option, and Re.Pack's config defaults don't set it either, so existing builds produce the samesourcesas before. The dev server case is unchanged.I also added a short
SourceMapPluginsection to the internal plugins docs page with an example.Test plan
packages/repack/src/plugins/__tests__/SourceMapPlugin.test.tsbuilds a small project with Rspack and no dev server, and checkssources:devtoolModuleFilenameTemplate: 'app://[resource-path]':app://./index.js,app://./src/answer.jsand no absolute pathspnpm --filter @callstack/repack test: 44 suites, 388 tests passed.pnpm --filter @callstack/repack typecheckandpnpm lintpass.@callstack/repack.Fixes #1518